import smtplib
import sys
from email.mime.text import MIMEText
from email.header import Header

from_addr = 'xuezixiang108@foxmail.com'
password = 'xznjnyvgnvmuicji'

to_addr = sys.argv[1]

smtp_server = 'smtp.qq.com'


msg = MIMEText(
'<p class="ql-align-justify"><strong>尊敬的<u>&nbsp;&nbsp;&nbsp;'+ sys.argv[2]+'&nbsp;&nbsp;&nbsp;</u>女士/先生：</strong></p><p class="ql-align-justify">	感谢并欢迎您加入平安有限公司这支优秀的团队，成为我们亲密的工作伙伴！</p>'+
'<p class="ql-align-center"><img src=""></p>'
    , 'HTML', 'utf-8')

msg['From'] = Header(from_addr)
msg['To'] = Header(to_addr)

msg['Subject'] = Header(sys.argv[3])

server = smtplib.SMTP_SSL()
server.connect(smtp_server, 465)
server.login(from_addr, password)
server.sendmail(from_addr, to_addr, msg.as_string())
server.quit()